//package com.yxl.service.impl;
//
//
//import com.yxlcommon.common.pojo.Chat;
//import com.yxl.service.ChatService;
//import com.yxlcommon.common.vo.ChatVo;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.time.LocalDateTime;
//import java.util.List;
//
//@Slf4j
//@Service
//public class ChatServiceImpl extends ServiceImpl<ChatMapper, Chat> implements ChatService {
//
//    @Autowired
//    private ChatMapper chatMapper;
//
//    @Override
//    public void saveMessage(Integer fromId, Integer receiver, String message) {
//        Chat chat = new Chat();
//        chat.setCreatedTime(LocalDateTime.now());
//        chat.setSender(fromId);
//        chat.setReceiver(receiver);
//        chat.setMessage(message);
//        chat.setSessionType((byte)1);
//        chatMapper.insert(chat);
//    }
//
//    @Override
//    public ResultMessage<List<ChatVo>> getSession(Integer fromId, Integer receiver) {
//        return ResultMessage.operationalSuccess(200,"获取成功",chatMapper.getSessionByFromIdAndReceiver(fromId, receiver));
//    }
//
//
//}
